package icu.d4peng.cloud.common.log.bean;

import com.alibaba.fastjson.JSON;

import java.io.Serializable;
import java.util.Map;

/**
 * @author d4peng
 * @version 1.0.0
 * @date 2021-12-27 14:10
 * @description LogBean:日志信息
 */
public class LogBean implements Serializable {
    /**
     * tranceId
     */
    private String traceId;
    /**
     * spanId
     */
    private String spanId;
    /**
     * 当前ip
     */
    private String currentIp;
    /**
     * 上游App名称
     */
    private String preApp;
    /**
     * 上游主机名
     */
    private String preHost;
    /**
     * 上游IP
     */
    private String preIp;
    /**
     * 扩展信息
     */
    private Map<String, Object> extData;

    public String getTraceId() {
        return traceId;
    }

    public LogBean setTraceId(String traceId) {
        this.traceId = traceId;
        return this;
    }

    public String getSpanId() {
        return spanId;
    }

    public LogBean setSpanId(String spanId) {
        this.spanId = spanId;
        return this;
    }

    public String getCurrentIp() {
        return currentIp;
    }

    public LogBean setCurrentIp(String currentIp) {
        this.currentIp = currentIp;
        return this;
    }

    public String getPreApp() {
        return preApp;
    }

    public LogBean setPreApp(String preApp) {
        this.preApp = preApp;
        return this;
    }

    public String getPreHost() {
        return preHost;
    }

    public LogBean setPreHost(String preHost) {
        this.preHost = preHost;
        return this;
    }

    public String getPreIp() {
        return preIp;
    }

    public LogBean setPreIp(String preIp) {
        this.preIp = preIp;
        return this;
    }

    public Map<String, Object> getExtData() {
        return extData;
    }

    public LogBean setExtData(Map<String, Object> extData) {
        this.extData = extData;
        return this;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

}
